<?php
namespace app\common\model;

class MemberSeter extends Base
{
    /**
     * 根据uid查询所有安置人
     * @param  [type] $uid [description]
     * @return [type]      [description]
     */
    public function getSetersByUid($uid){
        $data = $this->where(['uid'=>$uid])->select();
        if($data){
            foreach($data as &$value):
                $value=$value->toArray();
                $value['seter_level'] = model('member')->where(['id'=>$value['seter_uid']])->value('level_id');
            endforeach;
        }else{
            $data=[];
        }
        return $data;
    }

}
